﻿using System.ServiceModel.Configuration;

namespace WU.LoadTester.Lib.Service.Bindings
{
    public class WsHttpBinding: System.ServiceModel.WSHttpBinding
    {
        public WsHttpBinding(WSHttpBindingElement element)
        {
            this.AllowCookies = element.AllowCookies;
            this.BypassProxyOnLocal = element.BypassProxyOnLocal;
            this.CloseTimeout = element.CloseTimeout;
            this.HostNameComparisonMode = element.HostNameComparisonMode;
            this.MaxBufferPoolSize = element.MaxBufferPoolSize;
            this.MaxReceivedMessageSize = element.MaxReceivedMessageSize;
            this.MessageEncoding = element.MessageEncoding;
            this.Name = element.Name;
            this.OpenTimeout = element.OpenTimeout;
            this.ProxyAddress = element.ProxyAddress;
            this.ReceiveTimeout = element.ReceiveTimeout;
            this.ReliableSession.Enabled = element.ReliableSession.Enabled;
            this.ReliableSession.InactivityTimeout = element.ReliableSession.InactivityTimeout;
            this.ReliableSession.Ordered = element.ReliableSession.Ordered;
            this.Security.Message.AlgorithmSuite = element.Security.Message.AlgorithmSuite;
            this.Security.Message.ClientCredentialType = element.Security.Message.ClientCredentialType;
            this.Security.Mode = element.Security.Mode;
            this.Security.Transport.ClientCredentialType = element.Security.Transport.ClientCredentialType;
            this.Security.Transport.ProxyCredentialType = element.Security.Transport.ProxyCredentialType;
            this.Security.Transport.Realm = element.Security.Transport.Realm;
            this.SendTimeout = element.SendTimeout;
            this.TextEncoding = element.TextEncoding;
            this.TransactionFlow = element.TransactionFlow;
            this.UseDefaultWebProxy = element.UseDefaultWebProxy;
        }
    }
}
